package comxin.lambda;

import org.junit.Test;

public class Test_lambda {
    @Test
    public void method1(){
        new Thread(()->{
            System.out.println("多线程启动了");
        }).start();
    }
    @Test
    public void method2(){
        UserDao userDao = new UserDao() {
            @Override
            public void regist() {
                System.out.println("注册成功");
            }
        };
        userDao.regist();
    }
    @Test
    public void method3(){
        method4(()->{
            System.out.println("注册成功");
        });
    }
    public void method4(UserDao userDao){
        userDao.regist();
    }


}
